import express from 'express';
import { userGuard, authGuard } from '../auth/auth.middleware';
import * as indexRouter from './index.controller';

const router = express.Router();

/**
 * 获取内容
 */
router.get('/index', userGuard, indexRouter.index);

/**
 * 获取单集电影
 */
router.get('/single', userGuard, indexRouter.single);

/**
 * 获取电视剧
 */
router.get('/multiple', userGuard, indexRouter.multiple);

/**
 * 获取内容(按 ID)
 */
router.get('/index/:postId', indexRouter.indexDetail);

/**
 * 信息圈
 */
router.get('/corner', userGuard, indexRouter.getCorners);

/**
 * 信息圈内容状态更改
 */
router.post('/cornerStatus', authGuard, indexRouter.changeCornersStatus)

/**
 * 导出路由
 */
export default router;
